<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="第一步找到这个文件 assets\bin\Data\Managed\Assembly-CSharp.dll 反编译unity3d中Dll代码 第二步 用dotpeek打开dll文件 https:&#x2F;&#x2F;www.jetbrains.com&#x2F;decompiler&#x2F;download&#x2F;download-thanks.html?platform&#x3D;windows64 蓝图1 单个炉子 炉子和一圈轨道   publ">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo">
<meta property="og:url" content="https://goofyer.gitee.io/notes-on-computer-expertise/2022/03/23/%E4%BB%A3%E7%A0%81%E5%AE%9E%E6%88%98/unity%E5%8F%8D%E7%BC%96%E8%AF%91/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="第一步找到这个文件 assets\bin\Data\Managed\Assembly-CSharp.dll 反编译unity3d中Dll代码 第二步 用dotpeek打开dll文件 https:&#x2F;&#x2F;www.jetbrains.com&#x2F;decompiler&#x2F;download&#x2F;download-thanks.html?platform&#x3D;windows64 蓝图1 单个炉子 炉子和一圈轨道   publ">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2022-03-23T10:45:22.733Z">
<meta property="article:modified_time" content="2022-03-23T12:39:13.360Z">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/notes-on-computer-expertise/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/notes-on-computer-expertise/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/notes-on-computer-expertise/css/style.css">

  
    
<link rel="stylesheet" href="/notes-on-computer-expertise/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/notes-on-computer-expertise/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/notes-on-computer-expertise/">Home</a>
        
          <a class="main-nav-link" href="/notes-on-computer-expertise/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/notes-on-computer-expertise/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://goofyer.gitee.io/notes-on-computer-expertise"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-代码实战/unity反编译" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/notes-on-computer-expertise/2022/03/23/%E4%BB%A3%E7%A0%81%E5%AE%9E%E6%88%98/unity%E5%8F%8D%E7%BC%96%E8%AF%91/" class="article-date">
  <time class="dt-published" datetime="2022-03-23T10:45:22.733Z" itemprop="datePublished">2022-03-23</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <p>第一步找到这个文件 assets\bin\Data\Managed\Assembly-CSharp.dll</p>
<p>反编译unity3d中Dll代码</p>
<p>第二步 用dotpeek打开dll文件</p>
<p><a target="_blank" rel="noopener" href="https://www.jetbrains.com/decompiler/download/download-thanks.html?platform=windows64">https://www.jetbrains.com/decompiler/download/download-thanks.html?platform=windows64</a></p>
<p>蓝图1</p>
<p>单个炉子</p>
<p>炉子和一圈轨道</p>
<p>  public void Import(BinaryReader r)<br>  {<br>    this.version = r.ReadInt32();<br>    this.cursorOffset_x = r.ReadInt32();<br>    this.cursorOffset_y = r.ReadInt32();<br>    this.cursorTargetArea = r.ReadInt32();<br>    this.dragBoxSize_x = r.ReadInt32();<br>    this.dragBoxSize_y = r.ReadInt32();<br>    this.primaryAreaIdx = r.ReadInt32();<br>    int length1 = (int) r.ReadByte();<br>    this.areas = length1 &gt;= 0 &amp;&amp; length1 &lt;= 64 &amp;&amp; this.primaryAreaIdx &gt;= -1 &amp;&amp; this.primaryAreaIdx &lt;= length1 ? new BlueprintArea[length1] : throw new Exception(“Corrupt Data”);<br>    for (int index = 0; index &lt; length1; ++index)<br>    {<br>      this.areas[index] = new BlueprintArea();<br>      this.areas[index].Import(r, this.version);<br>    }<br>    int length2 = r.ReadInt32();<br>    this.buildings = length2 &gt;= 0 &amp;&amp; length2 &lt;= 1048576 ? new BlueprintBuilding[length2] : throw new Exception(“Corrupt Data”);<br>    for (int index = 0; index &lt; length2; ++index)<br>    {<br>      this.buildings[index] = new BlueprintBuilding();<br>      this.buildings[index].Import(r, this.version);<br>    }<br>    for (int index = 0; index &lt; length2; ++index)<br>    {<br>      if (this.buildings[index].outputObj == null &amp;&amp; this.buildings[index].tempOutputObjIdx &gt;= 0)<br>        this.buildings[index].outputObj = this.buildings[this.buildings[index].tempOutputObjIdx];<br>      if (this.buildings[index].inputObj == null &amp;&amp; this.buildings[index].tempInputObjIdx &gt;= 0)<br>        this.buildings[index].inputObj = this.buildings[this.buildings[index].tempInputObjIdx];<br>    }<br>    this.DataRepair();<br>  }</p>
<p>  public void Export(BinaryWriter w)<br>  {<br>    this.version = 1;<br>    w.Write(this.version);<br>    w.Write(this.cursorOffset_x);<br>    w.Write(this.cursorOffset_y);<br>    w.Write(this.cursorTargetArea);<br>    w.Write(this.dragBoxSize_x);<br>    w.Write(this.dragBoxSize_y);<br>    w.Write(this.primaryAreaIdx);<br>    int num1 = this.areas != null ? this.areas.Length : 0;<br>    w.Write((byte) num1);<br>    for (int index = 0; index &lt; num1; ++index)<br>      this.areas[index].Export(w);<br>    int num2 = this.buildings != null ? this.buildings.Length : 0;<br>    w.Write(num2);<br>    for (int index = 0; index &lt; num2; ++index)<br>      this.buildings[index].Export(w);<br>  }</p>
<p>public StringBuilder ToBase64StringBuilder()<br>  {<br>    try<br>    {<br>      StringBuilder base64StringBuilder = new StringBuilder(1024);<br>      using (MemoryStream output = new MemoryStream())<br>      {<br>        using (BinaryWriter w = new BinaryWriter((Stream) output))<br>        {<br>          this.Export(w);<br>          output.Position = 0L;<br>          using (MemoryStream memoryStream = new MemoryStream())<br>          {<br>            using (GZipStream destination = new GZipStream((Stream) memoryStream, CompressionMode.Compress))<br>              output.CopyTo((Stream) destination);<br>            byte[] array = memoryStream.ToArray();<br>            base64StringBuilder.Append(this.headerStr);<br>            base64StringBuilder.Append(Convert.ToBase64String(array));<br>            string str = MD5F.Compute(base64StringBuilder.ToString());<br>            base64StringBuilder.Append(“\””);<br>            base64StringBuilder.Append(str);<br>            return base64StringBuilder;<br>          }<br>        }<br>      }<br>    }<br>    catch (Exception ex)<br>    {<br>      Debug.LogError((object) ex.ToString().Replace(“Exception”, “Excption”));<br>    }<br>    return (StringBuilder) null;<br>  }</p>
<p>public BlueprintDataIOError ContentFromBase64String(string strData)<br>  {<br>    try<br>    {<br>      int num1 = -1;<br>      int num2 = -1;<br>      for (int index = 0; index &lt; strData.Length; ++index)<br>      {<br>        if (strData[index] == ‘“‘)<br>        {<br>          num1 = index;<br>          break;<br>        }<br>      }<br>      if (num1 &lt; 0)<br>        return BlueprintDataIOError.DataCorruption;<br>      for (int index = strData.Length - 1; index &gt;= 0; —index)<br>      {<br>        if (strData[index] == ‘“‘)<br>        {<br>          num2 = index;<br>          break;<br>        }<br>      }<br>      if (num2 &lt; num1 + 32)<br>        return BlueprintDataIOError.DataCorruption;<br>      using (MemoryStream memoryStream1 = new MemoryStream(Convert.FromBase64String(strData.Substring(num1 + 1, num2 - num1 - 1))))<br>      {<br>        using (MemoryStream memoryStream2 = new MemoryStream())<br>        {<br>          using (GZipStream gzipStream = new GZipStream((Stream) memoryStream1, CompressionMode.Decompress))<br>            gzipStream.CopyTo((Stream) memoryStream2);<br>          memoryStream2.Position = 0L;<br>          using (BinaryReader r = new BinaryReader((Stream) memoryStream2))<br>            this.Import(r);<br>        }<br>      }<br>      return BlueprintDataIOError.OK;<br>    }<br>    catch (Exception ex)<br>    {<br>      Debug.LogError((object) (“Load Blueprint Error: \r\n” + ex.ToString().Replace(“Exception”, “Excption”)));<br>      return BlueprintDataIOError.DataCorruption;<br>    }<br>  }</p>
<p>public class BlueprintData<br>{<br>  public DateTime time;<br>  public string gameVersion;<br>  public string shortDesc;<br>  public string desc;<br>  public EIconLayout layout;<br>  public int icon0;<br>  public int icon1;<br>  public int icon2;<br>  public int icon3;<br>  public int icon4;<br>  public int cursorOffset_x;<br>  public int cursorOffset_y;<br>  public int cursorTargetArea;<br>  public int dragBoxSize_x;<br>  public int dragBoxSize_y;<br>  public int primaryAreaIdx;<br>  public BlueprintArea[] areas;<br>  public BlueprintBuilding[] buildings;<br>  private List<BlueprintBuilding> _tmp_buidings = new List<BlueprintBuilding>();<br>  private List<BlueprintBuilding> _del_buidings = new List<BlueprintBuilding>();<br>  private int version;</p>
<p>  public bool isValid =&gt; this.primaryAreaIdx &gt;= 0 &amp;&amp; this.buildings != null &amp;&amp; this.areas != null &amp;&amp; this.areas.Length != 0;</p>
<p>  public bool isEmpty =&gt; this.buildings == null || this.buildings.Length == 0;</p>
<p>  public static bool IsNullOrEmpty(BlueprintData blueprint) =&gt; blueprint == null || !blueprint.isValid || blueprint.buildings.Length == 0;</p>
<p>  public string headerStr =&gt; “BLUEPRINT:0,” + ((int) this.layout).ToString() + “,” + this.icon0.ToString() + “,” + this.icon1.ToString() + “,” + this.icon2.ToString() + “,” + this.icon3.ToString() + “,” + this.icon4.ToString() + “,0,” + this.time.Ticks.ToString() + “,” + this.gameVersion + “,” + this.shortDesc.Escape() + “,” + this.desc.Escape() + “\””;</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://goofyer.gitee.io/notes-on-computer-expertise/2022/03/23/%E4%BB%A3%E7%A0%81%E5%AE%9E%E6%88%98/unity%E5%8F%8D%E7%BC%96%E8%AF%91/" data-id="cl403sxrn002hf8vu3wl565w6" data-title="" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/notes-on-computer-expertise/2022/03/25/%E4%BB%A3%E7%A0%81%E5%AE%9E%E6%88%98/unity%20%E6%88%98%E6%A3%8B/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          (no title)
        
      </div>
    </a>
  
  
    <a href="/notes-on-computer-expertise/2022/03/23/%E4%BB%A3%E7%A0%81%E5%AE%9E%E6%88%98/%E4%B8%AD%E5%9B%BD%E8%B1%A1%E6%A3%8Bunity/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title"></div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/C-%E5%B7%A5%E5%85%B7/">C#工具</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/C-%E5%B7%A5%E5%85%B7/">C++工具</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/Mysql/">Mysql</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/blender/">blender</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/linux/">linux</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/manim/">manim</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/spring/">spring</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/vba%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/">vba基础操作</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E5%88%9B%E9%80%A0%E6%A8%A1%E5%BC%8F/">创造模式</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/">操作系统</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/">操作系统基础知识</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%BC%80%E5%8F%91/">操作系统开发</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E6%95%B0%E5%AD%A6/">数学</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/">数据结构基础知识</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E6%A8%A1%E6%9D%BF/">模板</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0/">深度学习</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E8%8B%B1%E8%AF%AD/">英语</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E8%99%9A%E5%B9%BB4/">虚幻4</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/">计算机组成原理</a></li><li class="category-list-item"><a class="category-list-link" href="/notes-on-computer-expertise/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/">计算机网络</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/notes-on-computer-expertise/tags/C/" rel="tag">C++</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/notes-on-computer-expertise/tags/C/" style="font-size: 10px;">C++</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/notes-on-computer-expertise/archives/2022/05/">May 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/notes-on-computer-expertise/archives/2022/03/">March 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/notes-on-computer-expertise/archives/2022/02/">February 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/notes-on-computer-expertise/archives/2022/01/">January 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/notes-on-computer-expertise/archives/2021/12/">December 2021</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/notes-on-computer-expertise/2022/05/31/vue/%E5%89%8D%E7%AB%AF%E6%A1%86%E6%9E%B6%E9%AA%8C%E8%AF%81%E7%A0%81%E6%97%A0%E6%B3%95%E6%98%BE%E7%A4%BA/">(no title)</a>
          </li>
        
          <li>
            <a href="/notes-on-computer-expertise/2022/05/26/%E6%95%B0%E6%8D%AE%E5%BA%93/navicat%E5%AE%89%E8%A3%85/">(no title)</a>
          </li>
        
          <li>
            <a href="/notes-on-computer-expertise/2022/05/25/%E8%99%9A%E5%B9%BB4%E5%BC%95%E6%93%8E%E5%BC%80%E5%8F%91/%E8%99%9A%E5%B9%BB%E5%9B%9B%20mod%E5%88%B6%E4%BD%9C/">(no title)</a>
          </li>
        
          <li>
            <a href="/notes-on-computer-expertise/2022/05/23/python/python%E6%89%B9%E9%87%8F%E7%94%9F%E6%88%90%E6%95%B0%E6%8D%AE/">(no title)</a>
          </li>
        
          <li>
            <a href="/notes-on-computer-expertise/2022/05/23/vba%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C%E7%AC%94%E8%AE%B0/EXCEL%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/">(no title)</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2022 John Doe<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/notes-on-computer-expertise/" class="mobile-nav-link">Home</a>
  
    <a href="/notes-on-computer-expertise/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/notes-on-computer-expertise/js/jquery-3.4.1.min.js"></script>



  
<script src="/notes-on-computer-expertise/fancybox/jquery.fancybox.min.js"></script>




<script src="/notes-on-computer-expertise/js/script.js"></script>





  </div>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ["$","$"], ["\\(","\\)"] ],
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
            processEscapes: true
        }
    });
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax();
        for (var i = 0; i < all.length; ++i)
            all[i].SourceElement().parentNode.className += ' has-jax';
    });
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script>
</body>
</html>